/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.star.common;

/**
 *
 * @author Administrator
 */
public class PriorityPostData {
    String id;
    String idPost;
    short position;
    String author;
    String editor;
    long updated;
    long created;
    
    // contructor for add new
    public PriorityPostData(String idPost, short position, String author) {  
        this.idPost = idPost;
        this.position = position;
        this.author = author;
        this.editor = author;
        this.updated = System.currentTimeMillis()/1000L;
        this.created = System.currentTimeMillis()/1000L;        
    }
    
    // contructor for edit
    public PriorityPostData(String id, String idPost, short position, String editor) {
        this.id = id;
        this.idPost = idPost;
        this.position = position;        
        this.editor = editor;
        this.updated = System.currentTimeMillis()/1000L;        
    }
    
    public PriorityPostData(String id, String idPost, short position, 
            String author, String editor, long updated, long created) {
        this.id = id;
        this.idPost = idPost;
        this.position = position; 
        this.author = author;
        this.editor = editor;
        this.created = created;
        this.updated = updated;        
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIdPost() {
        return idPost != null ? idPost : "";
    }

    public void setIdPost(String idPost) {
        this.idPost = idPost;
    }

    public short getPosition() {
        return position;
    }

    public void setPosition(short position) {
        this.position = position;
    }

    public String getAuthor() {
        return author != null ? author : "";
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getEditor() {
        return editor != null ? editor : "";
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    public long getUpdated() {
        return updated;
    }

    public void setUpdated(long updated) {
        this.updated = updated;
    }

    public long getCreated() {
        return created;
    }

    public void setCreated(long created) {
        this.created = created;
    }
    
    
    
}
